# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
# Contributor: Marcus Schulderinsky <mmaacceess at gmail dot com>

pkgname=lxmusic
pkgver=0.4.7
pkgrel=7
pkgdesc='Lightweight music player (XMMS2 client)'
arch=('loong64' 'x86_64')
url='https://lxde.org/'
license=('GPL2')
groups=('lxde')
depends=('gtk3' 'libnotify' 'xmms2')
makedepends=('intltool')
replaces=('lxmusic-gtk3')
source=("https://downloads.sourceforge.net/lxde/$pkgname-$pkgver.tar.xz"
        'lxmusic.appdata.xml'
        '0001-Use-themed-icon.patch')
sha256sums=('4933987338eb6e8c77d63b14cea5a8886146e75acbc38a21438c6c3f47bc06ba'
            '0093885fe76bda60a1b319970bd8d148903a3adb674690d3d9cf9262e053b05b'
            '9cd869db22ac71c01e90365d9252b72bde64ec9f0a0bad8fecc32319da0a99fe')

prepare() {
  cd $pkgname-$pkgver
  # Use themed icon
  patch -Np1 -i ../0001-Use-themed-icon.patch
  autoreconf -fi
}

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr --enable-gtk3
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
  install -Dm644 ../$pkgname.appdata.xml "$pkgdir/usr/share/metainfo/$pkgname.appdata.xml"
}
